#include <arpa/inet.h>
#include <stdio.h>

int main()
{
    short int a = 0x1234;
    printf("%x\n",htons(a));
    return 0;
}